/**
 * Created by ybjaa on 2017/7/7.
 */
export function clearParentValidator(){


    return function (target:any,propertyName:string) {


        if(!target[Symbol.for("clearValidator")]){
            target[Symbol.for("clearValidator")]=new Map<Object,string[]>();
        }

        let map:Map<Object,string[]>=target[Symbol.for("clearValidator")];

        let targetMap:string[]=null;


        if(!map.has(target)){
            targetMap=[];
            targetMap.push(propertyName);
            map.set(target,targetMap);
            return;
        }else {
            targetMap=map.get(target);
        }

        if(targetMap.length>0&&targetMap.some((p)=>p==propertyName)) return;

        targetMap.push(propertyName);






    }


}